# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem              1.0
PortGroup               compiler_blacklist_versions 1.0
PortGroup               muniversal 1.0

# Please keep the libpixman and libpixman-devel ports as similar as possible.

name                    OCPN_libpixman
conflicts               libpixman-devel
set my_name             pixman
version                 0.38.4
revision                0
checksums               rmd160  106b73f871b5e0f8a739a47788fb9fd7a82cb8c5 \
                        sha256  84abb7fa2541af24d9c3b34bf75d6ac60cc94ac4410061bbb295b66a29221550 \
                        size    756898

categories              graphics
platforms               darwin
maintainers             {ryandesign @ryandesign}
license                 X11

homepage                http://www.pixman.org
master_sites            https://www.x.org/archive/individual/lib/

dist_subdir             libpixman-devel
distname                ${my_name}-${version}
use_bzip2               yes
use_parallel_build      yes

description             Pixel region Library

long_description        libpixman is a generic library for manipulating pixel \
                        regions. A PixRegion is a set of Y-X banded rectangles \
                        that cover the desired region.

patchfiles              patch-pixman-pixman-vmx.c.diff

# llvm-gcc-4.2 makes cairo fail to generate PDFs properly
# clang on Xcode 4.1 cannot build libpixman
compiler.blacklist      llvm-gcc-4.2 {clang < 211.10.1}

configure.cflags-append     "-mmacosx-version-min=10.9"

configure.args          ac_cv_prog_AWK=/usr/bin/awk \
                        ac_cv_path_GREP=/usr/bin/grep \
                        lt_cv_path_SED=/usr/bin/sed \
                        --disable-gtk \
                        --disable-libpng \
                        --disable-mmx

build.args              V=1

test.run                yes
test.target             check

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/libpixman
    xinstall -d ${docdir}
    xinstall -m 0644 -W ${worksrcpath} \
        COPYING \
        README \
        ${docdir}
}

platform darwin 8 powerpc {
    # apple-gcc-4.2 makes Tiger ppc fail to detect pthread support and then fail to build
    compiler.blacklist-append apple-gcc-4.2
}

livecheck.type          regex
livecheck.url           [lindex ${master_sites} 0]
livecheck.regex         ${my_name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)${extract.suffix}
